Skip to content

Conversation

@majochem
Copy link
Contributor

Partially fixes #502 . (Will have to check after 0.3.0 because behavior will change)

Description of the problem being solved:

PoE2 treats the active portion of totem skills as separate "totemified" skills, rather than additional stat sets of the same skill. This lead to several problems because totem base stats are only available on the "base" skill (which in case of "Ancestral Warrior Totem" is on entirely different gem, as well)

List of fixed issues:

  1. Totem level was incorrectly always set to 1 because the "totemified" skills had a levelRequirement = 0 leading to crashes when trying to determine totem level in some cases
  2. skillTotemId was not working because the stat was not present on the "totemified" skill
  3. Totem life values were incorrect as a result of 1. and 2.
  4. Skills supported by "Ancestral Warrior Totem" were not recognized as totem skills at all (and thus didn't benefit from totem-related stats)
  5. The "totemified" part of Dark Effigy was lacking the totem flag
  6. Totem limit was always 1 higher than it should be because totem skills now come with { "base_number_of_totems_allowed", 1 }, making the "Base" mod in CalcSetup redundant

Additional Notes:

  • I originally started this PR to implement the alt_attack_container behavior which made totems have their own weapon-independent attack stats. Since this behavior will be changed in 0.3.0 in a few days, it makes no sense to include here, but I have it saved somewhere in case we ever have to user alt_attack_container for something else.

Steps taken to verify a working solution:

  • Totem stats are now visible for all portions of totem skills
  • In case of "Ancestral Warrior Totem", totem level is correctly based on the level of the "support" rather than the totemified skill
  • Totemified skills correctly benefit from totem-related stats
  • Totem-related stat values match between totemified and totem base skills

Link to a build that showcases this PR:

https://maxroll.gg/poe2/pob/qaitk0qc

Before screenshot:

No totem stats
image

No increase from totem damage (Sunder on Ancestral Warrior Totem)
image

After screenshot:

now with totem stats
image
image

Increase from totem damage works now (Sunder on Ancestral Warrior Totem)
image

The 'totem' flag was missing for the damaging part of the skill
`addFlags` functionality was accidentally broken in PathOfBuildingCommunity#62 because
`mainSkillFlags` and `calcSkillFlags` variables were introduced but
seemingly later made redundant to use the original `skillFlags`.

However the `addFlags` section still checked the old variables which were
now `nil`. This wasn't a problem until now, because the PoE2 skills had
not used `addFlags` yet.
`CalcSetup` previous added +1 to "ActiveTotemLimit" as a base, but
totem skills in PoE2 always come with "base_number_of_totems_allowed"
values, which led to the values always being 1 too high
This fixes previous problems that were caused by totem skills consisting
of multiple parts, such as inability to get correct skillTotemId and
level requirement for the "active" portion of a totem skill.

The skill (or support) that provides the baseTotem data is now
identified within `CalcActiveSkill`

Examples:
- "Shockwave Totem" -> "Wave" would not show correct totem stats
- "Sunder" attached to "Ancestral Warrior Totem" would not show any
  totem stats at all
@majochem majochem marked this pull request as ready for review August 25, 2025 16:24
LocalIdentity added 2 commits September 2, 2025 16:08
Adds support for a few stats on mortar cannon and ancestral totem too
@LocalIdentity LocalIdentity changed the title Improve Totem Stat Behaviour Add support for Totems Sep 2, 2025
@LocalIdentity LocalIdentity added the enhancement New feature, calculation, or mod label Sep 2, 2025
@LocalIdentity LocalIdentity merged commit a458b6b into PathOfBuildingCommunity:dev Sep 2, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, calculation, or mod

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ancestral Warrior Totem doesn't work

2 participants